<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<script src="js/vue.js"></script>
<body>
    <div class="box">
        <!-- <input type="checkbox" name="" id="" v-model="checked" true-value="666" false-value="777">
        <h1>{{checked}}</h1> -->
        <!-- <input type="radio" name="sex" id="nan" value="男" v-model="radioValue">
        <label for="nan">男</label>
        <input type="radio" name="sex" id="nv" value="女" v-model="radioValue">
        <label for="nv">女</label>
        <h1>{{radioValue}}</h1> -->
        <input type="radio" name="sex" id="nan" :value="sexValue" v-model="radioValue">
        <label for="nan">{{sexValue}}</label>
        <h1>{{radioValue}}</h1>
        <button @click="flag = !flag">改变值</button>



    </div>
    <script>

        const vm = new Vue({
            el:'.box',
            data:{
                checked:'',
                radioValue:'',
                // sexValue:'',
                flag:true
            },
            computed:{
                sexValue(){
                    return this.flag ? '男' : '女';
                }
            }
        })  
    </script>
</body>
</html>